<?php
ini_set("date.timezone", "Asia/Shanghai");

main();

function main()
{
    print date("Y-m-d H:i:s:u")."\n";
    print strftime("%Y-%m-%d %H:%M:%S")."\n";
    print strftime("%F %T")."\n";
    print strftime("%Y-%m-%d %H:%M:%S",
            strtotime("+1 day", time()))."\n";

    $arr=gettimeofday();
    print_r($arr);
    printf("%s:%03d\n",
            strftime("%Y-%m-%d %H:%M:%S", $arr['sec']),
            (int)($arr['usec']/1000));

    $d1=strftime("%Y%m%d", strtotime("-10 day"));
    print $d1."\n";
    $d2=strftime("%Y%m%d", strtotime("-1 day", strtotime($d1)));
    print $d2."\n";
}
?>
